﻿@if (ViewBag.CurrentSortBy == ViewBag.ColumnName && ViewBag.CurrentSortOrder == SortOrderOptions.ASC.ToString())
{
 <th>
  <a href="/persons/index?searchBy=@ViewBag.CurrentSearchBy&searchString=@ViewBag.CurrentSearchString&sortBy=ViewBag.ColumnName&sortOrder=@nameof(SortOrderOptions.DESC)">@ViewBag.DisplayName</a>
  <i class="fa-solid fa-sort-up"></i>
 </th>
}
else if (ViewBag.CurrentSortBy == nameof(PersonResponse.PersonName) && ViewBag.CurrentSortOrder == SortOrderOptions.DESC.ToString())
{
 <th>
  <a href="/persons/index?searchBy=@ViewBag.CurrentSearchBy&searchString=@ViewBag.CurrentSearchString&sortBy=@ViewBag.ColumnName&sortOrder=@nameof(SortOrderOptions.ASC)">@ViewBag.DisplayName</a>
  <i class="fa-solid fa-sort-down"></i>
 </th>
}
else
{
 <th>
  <a href="~/persons/index?searchBy=@ViewBag.CurrentSearchBy&searchString=@ViewBag.CurrentSearchString&sortBy=@ViewBag.ColumnName&sortOrder=@nameof(SortOrderOptions.ASC)">@ViewBag.DisplayName</a>
 </th>
}